<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>E-天下商旅-后台管理</title>
<link href="${ctx}/resources/css/page_tour.css" rel="stylesheet" type="text/css">
<script src="${ctx}/resources/script/validate/jquery-1.4.min.js" type="text/javascript"></script>
</head>

<script type="text/javascript">  
	function searchPsw(){   
		var baseAccount = $("#baseAccount").val();
		
	 	var url = "${ctx}/memberBI/backstage/loadInitMBIPsw?timestap="+(new Date()).valueOf()+"&baseAccount="+baseAccount;
	 	window.location.href = url;
	     
	}
</script>
<body>

<jsp:include page="../commons/header.jsp">
	 <jsp:param name="currentMenu" value="menu4"/>
</jsp:include>


<div class="main_box">
<div class="main cf">

	 <jsp:include page="../commons/left.jsp"></jsp:include>
	<div class="right">
		<div class="right_box">
			<div class="title"><span><a href="#">修改用户信息</a></span></div>
			<div class="content cf">
				<div class="write" >	
				   <form id="initPswForm" name="initPswForm" action="" method="post">	
				    <table width="100%">
				    	<tr>
				    		<td width="100px;">
				    			用户名：
					          </td>
				    		<td width="320px;">				    		
				    		    <input type="text" value="${memberBaseInfo.baseUsername}" name="baseAccount" id="baseAccount" />&nbsp;&nbsp;&nbsp;<span style="color:red">请输入要修改信息的用户名查询</span>
				    		 </td>
				    		 <td style="text-align: left"><input type="button" onclick="searchPsw();" value="查询" /><span style="color:red">${error}</span></td>
				    	</tr>				    	
				    	<tr>
				    		<td>姓名：</td>
				    		<td colspan="2"><input type="text" name="baseName" value="${memberBaseInfo.baseName}" /></td>
				    	</tr>
				    	<tr>
				    		<td>是否初始化密码：</td>
				    		<td colspan="2"><input type="radio" name="initPsw" value="true"  />初始化&nbsp;<input type="radio" checked="checked" name="initPsw" value="false" />不初始化</td>
				    	</tr>
				    	<tr>
				    		<td>身份证号码：</td>
				    		<td>${memberBaseInfo.baseIdcard}</td>
				    	</tr>	
				    	<tr>
				    		<td colspan="3"><input type="submit" value="修改用户资料" /></td>				    		
				    	</tr>				    	
				    </table>
				   </form>			
				</div>
				<div name="travelData" id="travelData"></div>
			</div>
		</div>
	</div>
		
</div>
</div>


<jsp:include page="../commons/footer.jsp"></jsp:include>

<script src="${ctx}/resources/script/common.js"></script>
<script type="text/javascript" src="${ctx}/resources/script/validate/jquery.validate.js"></script>
<script type="text/javascript" src="${ctx}/resources/script/validate/jquery.metadata.js"></script>
<script type="text/javascript" src="${ctx}/resources/script/validate/additional-methods.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/resources/script/validate/messages_cn.js" charset="utf-8"></script>
<script type="text/javascript">

function submitModifInitForm(){
	     var url = "${ctx}/memberBI/backstage/initMBIPsw?timestap="+(new Date()).valueOf();
	     $.ajax({
	         type: "post",
	         async:false,
	         url: url,
	         dataType: "json",
	         data:$("#initPswForm").serialize(),
	         success: function(getmsg){  		            
	         	 alert(getmsg.context);	
	         	 window.location.href="${ctx}/memberBI/backstage/loadInitMBIPsw?timestap="+(new Date()).getTime();
	         }
	     });
	
}
$(function(){
      $("#initPswForm").validate({		
		submitHandler:function(form){
			submitModifInitForm();
		}	
	 });
});
</script>
</body>
</html>

